<template>
	<view class="content">
		<view class="pageHeader">
			账号资金
			<a class="generalBack" @click="backpage()" hover-class="none">
			 <image src="/static/b-1.png" style="width: 18upx;height: 30upx;"></image>
			 </a>
		</view>
		<view class="regoodbox" style="font-size: 30upx;color: #333;">
			<view class="flex jsb">
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-1.png" mode="widthFix" style="width: 82upx;"></image>
					</view>
					<text>文件数量</text>
					<view style="color:#6C63FF;margin-top: 10upx;">{{userInfo.file}}份</view>
				</view>
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-2.png" mode="widthFix" style="width: 120upx;"></image>
					</view>
					<text>用户余额</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.balance}}</view>
				</view>
			</view>
			<view class="flex jsb f-margin">
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-3.png" mode="widthFix" style="width: 80upx;"></image>
					</view>
					<text>(VS)志愿积分</text>
					<view style="color:#6C63FF;margin-top: 10upx;">{{userInfo.integral}}分</view>
				</view>
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-4.png" mode="widthFix" style="width: 92upx;"></image>
					</view>
					<text>市场销售业绩</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.sales_performance}}</view>
				</view>
			</view>
			<view class="flex jsb f-margin">
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-5.png" mode="widthFix" style="width: 62upx;"></image>
					</view>
					<text>红包业绩升级</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.performance_bonus}}</view>
				</view>
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-6.png" mode="widthFix" style="width: 72upx;"></image>
					</view>
					<text>运营商-分享佣金</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.operator_share_commission}}</view>
				</view>
			</view>
			<view class="flex jsb f-margin">
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-7.png" mode="widthFix" style="width: 78upx;"></image>
					</view>
					<text>运营商-销售利润</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.operator_sales_profit}}</view>
				</view>
				<view class="aitem">
					<view class="imgitem">
						<image src="../../static/z-8.png" mode="widthFix" style="width:72upx;"></image>
					</view>
					<text>运营商-红包分润</text>
					<view style="color:#6C63FF;margin-top: 10upx;">￥{{userInfo.operator_red_envelope}}</view>
				</view>
			</view>
		</view>
	</view>
	</template>
	<script>
	import postAjax from '../../API/postAjax.js'
	export default {
		data() {
			return {
				userInfo:'',
				userToken:''
			}
		},
		onLoad() {
			let that = this
			that.userToken = uni.getStorageSync('token')
			that.getUserInfo()
		},
		methods: {
			// 返回上一页
			backpage(){
				uni.navigateBack({
					delta:1
				})
			},
			// 获取资金记录
			getUserInfo(){
				let that = this
				postAjax('user/Center',{token:that.userToken},function(data){
					if(data.code==0){
						that.userInfo = data.data.user
					}else{
						that.getUserInfo()
					}
					
				})
			},
		}
	}
	
</script>

<style>
	.content{min-height: 100vh;background-color: #fff;}
	.pageHeader{height: 128upx;background-color: #1D84E8;line-height: 128upx;text-align: center;font-size: 36upx;color: #fff;padding-top: 40upx;}
	.generalBack{position: absolute;top:40upx;left:30upx;display: block;}
	.regoodbox{;padding:30upx 30upx 0;}
	.aitem{padding: 20upx;border:1px solid rgba(157,204,251,1);width: 42%;text-align: center;font-size: 28upx;color: #666;border-radius: 20upx;}
	.imgitem{height:90upx;}
	.f-margin{margin-top: 26upx;}
</style>
